// 模拟后端动态生成路由
import { MockMethod } from "vite-plugin-mock";
import { frame, doc } from "@/router/enums";
// const IFrame = () => import("@/views/list/card/index.vue");
/**
 * roles：页面级别权限，这里模拟二种 "admin"、"common"
 * admin：管理员角色
 * common：普通角色
 */

// const tabsRouter = {
//   path: "/tabs",
//   meta: {
//     icon: "IF-pure-iconfont-tabs",
//     title: "menus.hstabs",
//     rank: tabs
//   },
//   children: [
//     {
//       path: "/tabs/index",
//       name: "Tabs",
//       meta: {
//         title: "menus.hstabs",
//         roles: ["admin", "common"]
//       }
//     },
   
//     {
//       path: "/tabs/query-detail",
//       name: "TabQueryDetail",
//       meta: {
//         // 不在menu菜单中显示
//         showLink: false,
//         activePath: "/tabs/index",
//         roles: ["admin", "common"]
//       }
//     },
//     // params 传参模式
//     {
//       path: "/tabs/params-detail/:id",
//       component: "params-detail",
//       name: "TabParamsDetail",
//       meta: {
//         // 不在menu菜单中显示
//         showLink: false,
//         activePath: "/tabs/index",
//         roles: ["admin", "common"]
//       }
//     }
//   ]
// };

const pureRouter = {
  path: "/pure-admin-doc",
  meta: {
    icon: "IF-pure-iconfont-tabs",
    title: "楼层监控",
    rank: doc
  },
  children: [
    {
      path: "/pure-admin-doc/index",
      name: "doc",
      meta: {
        title: "楼层监控",
        roles: ["admin", "common"]
      }
    },
    // query 传参模式
     {
      path: "/pure-admin-doc/query-detail",
      name: "TabQueryDetail",
      meta: {
        // 不在menu菜单中显示
        showLink: false,
        activePath: "/pure-admin-doc/index",
        roles: ["admin", "common"]
      }
    },
    // params 传参模式
    {
      path: "/pure-admin-doc/params-detail/:id",
      component: "params-detail",
      name: "TabParamsDetail",
      meta: {
        // 不在menu菜单中显示
        showLink: false,
        activePath: "/pure-admin-doc/index",
        roles: ["admin", "common"]
      }
    },
   
  ]
};

export default [
  {
    url: "/getAsyncRoutes",
    method: "get",
    response: () => {
      return {
        success: true,
        data: []
      };
    }
  }
] as MockMethod[];
